<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="${pageContext.request.contextPath}/webjars/jquery/3.7.1/jquery.min.js"></script>
    <script src="${pageContext.request.contextPath}/webjars/bootstrap/5.1.3/js/bootstrap.bundle.min.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/webjars/bootstrap/5.1.3/css/bootstrap.min.css"/>
</head>
<body>
<jsp:useBean id="student" class="com.cn.domain.Student" />
<jsp:setProperty name="student" property="name" value="小明"/>
<jsp:setProperty name="student" property="age" value="18"/>
<jsp:setProperty name="student" property="sex" value="男"/>
<div class="container mt-3">
    <div class="card bg-primary text-white">
        <div class="card-body">
            姓名：<jsp:getProperty name="student" property="name" />
        </div>
    </div>
    <br>
    <div class="card bg-success text-white">
        <div class="card-body">年龄：<jsp:getProperty name="student" property="age" /></div>
    </div>
    <br>
    <div class="card bg-info text-white">
        <div class="card-body">性别：<jsp:getProperty name="student" property="sex"/></div>
    </div>
    <br>
</div>
</body>
</html>
